-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Update to ar_archive_writer 0.5 #145721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to ar_archive_writer 0.5 #145721
Conversation
Some changes occurred in compiler/rustc_codegen_ssa These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
How would that actually work? If you just do |
Let's take the example from the LLVM bug I posted above: For most arches this is mangled as So, with There are cases where 0.4.2 got the Arm64EC mangling correct, and those will now raise an error. |
If you do |
But if you use a simpler name where the old 0.4.2 algorithm happened to be correct, then it compiles correctly: https://rust.godbolt.org/z/dnhn64sqM but with 0.5.0 this will now raise an error. |
So basically before this PR there were cases where the name mangling was wrong for C++ on arm64ec when using raw-dylib and in those cases there was no workaround. And with this PR you simply can't correctly use C++ symbols with raw-dylib at all. |
Actually, the example that you provided works fine if you use I did some experiments with 0.4.2, and it did work correctly even with the incorrect Arm64EC mangling: turns out that we don't need the mangled name since the |
Ok, workaround in |
☔ The latest upstream changes (presumably #145923) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
@bjorn3 I've updated with the workaround I added in |
@bors r+ |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 154037f (parent) -> 7aef4be (this PR) Test differencesShow 2 test diffs2 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 7aef4bec4bec16cb6204d51eb633873e23b18771 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (7aef4be): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary -3.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 467.56s -> 469.026s (0.31%) |
This updates
ar_archive_writer
to 0.5, which in turn was updated to match LLVM 20.1.8: rust-lang/ar_archive_writer#24As part of this, I refactored part of
SymbolWrapper.cpp
to pull common code that I was about to duplicate again into a new function.NOTE:
ar_archive_writer
does include a breaking change where it no longer supports mangling C++ mangled names for Arm64EC. Since we don't need the mangled name (it's not the "exported name" which we're trying to load from the external dll), I'm setting theimport_name
when building for Arm64EC to prevent error when failing to mangle.r? @bjorn3